//
//  SemDetailViewController.m
//  Gradekeeper0.2
//
//  Created by Ben Wu on 11/18/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "SemDetailViewController.h"
#import <Foundation/NSObject.h>
//#import "Profile.h"

@implementation SemDetailViewController

@synthesize tableList;

-(void)viewDidLoad{
	[super viewDidLoad];
	
	tableList = [[NSMutableArray alloc] init];
	[tableList addObject: @"Fall Sememster"];
	//[tableList addObject: @"Spring Sememster"];
	//[tableList addObject: @"Summer Sememster"];
	[self setTitle:@"Table View"];
}


	
#pragma mark Table view methods
	
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

	
	
	// Customize the number of rows in the table view.
	- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
		return [tableList count];
	}
	
	
	// Customize the appearance of table view cells.
	- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
		
		static NSString *CellIdentifier = @"Cell";
		
		UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
		if (cell == nil) {
			cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
		}
		
		//set up each cell
		NSUInteger row = [indexPath row];
		cell.textLabel.text = [tableList objectAtIndex:row];
		return cell;
		
	}
	
	
/*	- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
		// Navigation logic may go here. Create and push another view controller.
		// AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil];
		// [self.navigationController pushViewController:anotherViewController];
		// [anotherViewController release];
		if ([[*/
	
	
	
	/*
	 // Override to support conditional editing of the table view.
	 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
	 // Return NO if you do not want the specified item to be editable.
	 return YES;
	 }
	 */
	
	
	/*
	 // Override to support editing the table view.
	 - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
	 
	 if (editingStyle == UITableViewCellEditingStyleDelete) {
	 // Delete the row from the data source
	 [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
	 }   
	 else if (editingStyle == UITableViewCellEditingStyleInsert) {
	 // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
	 }   
	 }
	 */
	
	
	/*
	 // Override to support rearranging the table view.
	 - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
	 }
	 */
	
	
	/*
	 // Override to support conditional rearranging of the table view.
	 - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
	 // Return NO if you do not want the item to be re-orderable.
	 return YES;
	 }
	 */
	
	
	- (void)dealloc {
		[super dealloc];
	}
	
	
	@end
	

